diff --git a/tests/TestCase/Network/SocketTest.php b/tests/TestCase/Network/SocketTest.php index 83c7ace5171..994cdff98b3 100644 --- a/tests/TestCase/Network/SocketTest.php +++ b/tests/TestCase/Network/SocketTest.php @@ -1,7 +1,5 @@ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @@ -17,6 +15,7 @@ namespace Cake\Test\TestCase\Network; use Cake\Network\Socket; +use Cake\Network\Error\SocketException; use Cake\TestSuite\TestCase; /** @@ -383,8 +382,12 @@ public function testGetContext() { 'ssl' => array('capture_peer' => true) ) ); - $this->Socket = new Socket($config); - $this->Socket->connect(); + try { + $this->Socket = new Socket($config); + $this->Socket->connect(); + } catch (SocketException $e) { + $this->markTestSkipped('No network, skipping test.'); + } $result = $this->Socket->context(); $this->assertEquals($config['context'], $result); } diff --git a/tests/TestCase/TestSuite/TestCaseTest.php b/tests/TestCase/TestSuite/TestCaseTest.php index 17369b5a9bb..7f576bef8f1 100644 --- a/tests/TestCase/TestSuite/TestCaseTest.php +++ b/tests/TestCase/TestSuite/TestCaseTest.php @@ -1,9 +1,5 @@ markTestIncomplete('Cannot work until fixtures are fixed'); - $test = new FixturizedTestCase('testFixtureLoadOnDemand'); $test->autoFixtures = false; $manager = $this->getMock('Cake\TestSuite\Fixture\FixtureManager'); @@ -195,47 +189,12 @@ public function testLoadFixturesOnDemand() { $this->assertEquals(0, $result->errorCount()); } -/** - * testLoadFixturesOnDemand - * - * @return void - */ - public function testUnoadFixturesAfterFailure() { - $this->markTestIncomplete('Cannot work until fixtures are fixed'); - $test = new FixturizedTestCase('testFixtureLoadOnDemand'); - $test->autoFixtures = false; - $manager = $this->getMock('Cake\TestSuite\Fixture\FixtureManager'); - $manager->fixturize($test); - $test->fixtureManager = $manager; - $manager->expects($this->once())->method('loadSingle'); - $result = $test->run(); - $this->assertEquals(0, $result->errorCount()); - } - -/** - * testThrowException - * - * @return void - */ - public function testThrowException() { - $this->markTestIncomplete('Cannot work until fixtures are fixed'); - $test = new FixturizedTestCase('testThrowException'); - $test->autoFixtures = false; - $manager = $this->getMock('Cake\TestSuite\Fixture\FixtureManager'); - $manager->fixturize($test); - $test->fixtureManager = $manager; - $manager->expects($this->once())->method('unload'); - $result = $test->run(); - $this->assertEquals(1, $result->errorCount()); - } - /** * testSkipIf * * @return void */ public function testSkipIf() { - $this->markTestIncomplete('Cannot work until fixtures are fixed'); $test = new FixturizedTestCase('testSkipIfTrue'); $result = $test->run(); $this->assertEquals(1, $result->skippedCount());