remove volatile tests
Some tests relying on timings and external network resources were not reliable and occasionally made builds on Travis fail.
This commit is contained in:
parent
56a75179d1
commit
24fb66ddf3
|
@ -820,25 +820,4 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|||
$this->assertIterator($expected, $finder);
|
||||
$this->assertIteratorInForeach($expected, $finder);
|
||||
}
|
||||
|
||||
public function testNonSeekableStream()
|
||||
{
|
||||
if (!in_array('ftp', stream_get_wrappers())) {
|
||||
$this->markTestSkipped(sprintf('Unavailable stream "%s".', 'ftp'));
|
||||
}
|
||||
|
||||
try {
|
||||
$i = Finder::create()->in('ftp://ftp.mozilla.org/')->depth(0)->getIterator();
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
$this->markTestSkipped(sprintf('Unsupported stream "%s".', 'ftp'));
|
||||
}
|
||||
|
||||
$contains = array(
|
||||
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README',
|
||||
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'index.html',
|
||||
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub',
|
||||
);
|
||||
|
||||
$this->assertIteratorInForeach($contains, $i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,25 +133,6 @@ class StopwatchEventTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals(0, $event->getStartTime(), null, self::DELTA);
|
||||
}
|
||||
|
||||
public function testEndTime()
|
||||
{
|
||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||
$this->assertEquals(0, $event->getEndTime());
|
||||
|
||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||
$event->start();
|
||||
$this->assertEquals(0, $event->getEndTime());
|
||||
|
||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||
$event->start();
|
||||
usleep(100000);
|
||||
$event->stop();
|
||||
$event->start();
|
||||
usleep(100000);
|
||||
$event->stop();
|
||||
$this->assertEquals(200, $event->getEndTime(), null, self::DELTA);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
|
|
|
@ -79,19 +79,6 @@ class StopwatchTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
||||
}
|
||||
|
||||
public function testLap()
|
||||
{
|
||||
$stopwatch = new Stopwatch();
|
||||
$stopwatch->start('foo', 'cat');
|
||||
usleep(100000);
|
||||
$event = $stopwatch->lap('foo');
|
||||
usleep(100000);
|
||||
$stopwatch->stop('foo');
|
||||
|
||||
$this->assertInstanceof('Symfony\Component\Stopwatch\StopwatchEvent', $event);
|
||||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
*/
|
||||
|
|
Reference in New Issue