Fixed stopwatch record duration test that didn’t test properly.

This commit is contained in:
Andrey Savchenko committed 2018-02-22 18:19:34 +02:00
1 parent 35e8caf1e4
commit 3cae2765cb
1 file changed
+2 -1
+2 -1
View File
@@ -19,6 +19,7 @@ class StopwatchTest extends LapsTestCase {
$collector->start( 'Event', 'info' );
$collector->start( 'Not stopped', 'info' );
usleep( 1000 );
$event = $collector->stop( 'Event' );
$this->assertFalse( $collector->stop( 'Not event' ) );
@@ -45,7 +46,7 @@ class StopwatchTest extends LapsTestCase {
$this->assertEquals( 'Event', $record->get_name() );
$this->assertEquals( 'info', $record->get_category() );
$this->assertEquals( $event->getOrigin() / 1000, $record->get_origin() );
$this->assertEquals( $event->getDuration(), $record->get_duration() );
$this->assertEquals( $event->getDuration() / 1000, $record->get_duration() );
$this->assertContains( 'Event', $record->get_description() );
}
}