Skip to content

Commit

Permalink
remove volatile tests
Browse files Browse the repository at this point in the history
Some tests relying on timings and external network resources were not
reliable and occasionally made builds on Travis fail.
  • Loading branch information
xabbuh committed Aug 8, 2014
1 parent 56a7517 commit 24fb66d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.
21 changes: 0 additions & 21 deletions src/Symfony/Component/Finder/Tests/FinderTest.php
Expand Up @@ -820,25 +820,4 @@ public function testMultipleLocationsWithSubDirectories()
$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);
}
}
19 changes: 0 additions & 19 deletions src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php
Expand Up @@ -133,25 +133,6 @@ public function testStartTime()
$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
*/
Expand Down
13 changes: 0 additions & 13 deletions src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
Expand Up @@ -79,19 +79,6 @@ public function testStop()
$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
*/
Expand Down

0 comments on commit 24fb66d

Please sign in to comment.