Phue\Test\Command\GetNewSensorsTest::testGetNewSensors PHP Method

testGetNewSensors() public method

Test: Get new sensors
public testGetNewSensors ( )
    public function testGetNewSensors()
    {
        // Send command and get response
        $response = $this->getNewSensors->send($this->mockClient);
        // Ensure response is self object
        $this->assertEquals($this->getNewSensors, $response);
        // Ensure array of sensors
        $this->assertInternalType('array', $response->getSensors());
        // Ensure expected number of sensors
        $this->assertEquals(2, count($response->getSensors()));
        // Ensure lastscan is active
        $this->assertTrue($response->isScanActive());
    }