/** * @depends testDeviceIsOnLine */ public function testSetDate(TAD $tad) { $date = '2000-01-01'; $time = '12:15:30'; $expected_response = $this->build_expected_response('SetDateResponse'); $response = $tad->set_date(['date' => $date, 'time' => $time])->to_xml(); $this->assertEquals($expected_response, $response); $dt = $tad->get_date(); $xml_object = new \SimpleXMLElement($dt); $tad->set_date(); $this->assertEquals($date, (string) $xml_object->Row->Date); $this->assertRegExp('/12:15:[0-9]{2}/', (string) $xml_object->Row->Time); }