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:
Christian Flothmann 2014-08-07 16:04:04 +02:00
parent 56a75179d1
commit 24fb66ddf3
3 changed files with 0 additions and 53 deletions

View File

@ -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);
}
}

View File

@ -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
*/

View File

@ -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
*/