Skip to content

Commit 24fb66d

Browse files
committed
remove volatile tests
Some tests relying on timings and external network resources were not reliable and occasionally made builds on Travis fail.
1 parent 56a7517 commit 24fb66d

File tree

3 files changed

+0
-53
lines changed

3 files changed

+0
-53
lines changed

src/Symfony/Component/Finder/Tests/FinderTest.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -820,25 +820,4 @@ public function testMultipleLocationsWithSubDirectories()
820820
$this->assertIterator($expected, $finder);
821821
$this->assertIteratorInForeach($expected, $finder);
822822
}
823-
824-
public function testNonSeekableStream()
825-
{
826-
if (!in_array('ftp', stream_get_wrappers())) {
827-
$this->markTestSkipped(sprintf('Unavailable stream "%s".', 'ftp'));
828-
}
829-
830-
try {
831-
$i = Finder::create()->in('ftp://ftp.mozilla.org/')->depth(0)->getIterator();
832-
} catch (\UnexpectedValueException $e) {
833-
$this->markTestSkipped(sprintf('Unsupported stream "%s".', 'ftp'));
834-
}
835-
836-
$contains = array(
837-
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README',
838-
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'index.html',
839-
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub',
840-
);
841-
842-
$this->assertIteratorInForeach($contains, $i);
843-
}
844823
}

src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -133,25 +133,6 @@ public function testStartTime()
133133
$this->assertEquals(0, $event->getStartTime(), null, self::DELTA);
134134
}
135135

136-
public function testEndTime()
137-
{
138-
$event = new StopwatchEvent(microtime(true) * 1000);
139-
$this->assertEquals(0, $event->getEndTime());
140-
141-
$event = new StopwatchEvent(microtime(true) * 1000);
142-
$event->start();
143-
$this->assertEquals(0, $event->getEndTime());
144-
145-
$event = new StopwatchEvent(microtime(true) * 1000);
146-
$event->start();
147-
usleep(100000);
148-
$event->stop();
149-
$event->start();
150-
usleep(100000);
151-
$event->stop();
152-
$this->assertEquals(200, $event->getEndTime(), null, self::DELTA);
153-
}
154-
155136
/**
156137
* @expectedException \InvalidArgumentException
157138
*/

src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,6 @@ public function testStop()
7979
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
8080
}
8181

82-
public function testLap()
83-
{
84-
$stopwatch = new Stopwatch();
85-
$stopwatch->start('foo', 'cat');
86-
usleep(100000);
87-
$event = $stopwatch->lap('foo');
88-
usleep(100000);
89-
$stopwatch->stop('foo');
90-
91-
$this->assertInstanceof('Symfony\Component\Stopwatch\StopwatchEvent', $event);
92-
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
93-
}
94-
9582
/**
9683
* @expectedException \LogicException
9784
*/

0 commit comments

Comments
 (0)