Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix coding standards
- Loading branch information
Showing
3 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 45 additions & 25 deletions
70
lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,58 @@ | ||
<?php | ||
/** | ||
* CakeTestSuiteDispatcherTest file | ||
* | ||
* Test Case for CakeTestSuiteDispatcher class | ||
* | ||
* PHP version 5 | ||
* | ||
* CakePHP : Rapid Development Framework (http://cakephp.org) | ||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* | ||
* Licensed under The MIT License | ||
* For full copyright and license information, please see the LICENSE.txt | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* @link http://cakephp.org CakePHP Project | ||
* @package Cake.Test.Case.TestSuite | ||
* @since CakePHP v 2.3.2 | ||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
|
||
class CakeTestSuiteDispatcherTest extends CakeTestCase { | ||
|
||
public function setUp() { | ||
$this->vendors = App::path('vendors'); | ||
$this->includePath = ini_get('include_path'); | ||
} | ||
public function setUp() { | ||
$this->vendors = App::path('vendors'); | ||
$this->includePath = ini_get('include_path'); | ||
} | ||
|
||
public function tearDown() { | ||
App::build(array('Vendor' => $this->vendors), App::RESET); | ||
ini_set('include_path', $this->includePath); | ||
} | ||
public function tearDown() { | ||
App::build(array('Vendor' => $this->vendors), App::RESET); | ||
ini_set('include_path', $this->includePath); | ||
} | ||
|
||
protected function clearPaths() { | ||
App::build(array('Vendor' => array('junk')), App::RESET); | ||
ini_set('include_path', 'junk'); | ||
} | ||
protected function clearPaths() { | ||
App::build(array('Vendor' => array('junk')), App::RESET); | ||
ini_set('include_path', 'junk'); | ||
} | ||
|
||
public function testLoadTestFramework() { | ||
$dispatcher = new CakeTestSuiteDispatcher(); | ||
public function testLoadTestFramework() { | ||
$dispatcher = new CakeTestSuiteDispatcher(); | ||
|
||
$this->assertTrue($dispatcher->loadTestFramework()); | ||
$this->assertTrue($dispatcher->loadTestFramework()); | ||
|
||
$this->clearPaths(); | ||
$this->clearPaths(); | ||
|
||
$exception = null; | ||
$exception = null; | ||
|
||
try { | ||
$dispatcher->loadTestFramework(); | ||
} catch (Exception $ex) { | ||
$exception = $ex; | ||
} | ||
try { | ||
$dispatcher->loadTestFramework(); | ||
} catch (Exception $ex) { | ||
$exception = $ex; | ||
} | ||
|
||
$this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning"); | ||
} | ||
$this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning"); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters