@@ -30,6 +30,7 @@ |
||
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | + * @param \Axstrad\Common\Tests\Util\DebugUtilTest $var |
|
| 33 | 34 | */ |
| 34 | 35 | public static function dump($var, $maxDepth = 2, $stripTags = true) |
| 35 | 36 | { |
@@ -1,14 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @copyright 2014-2015 Dan Kempster <[email protected]> |
|
| 11 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @copyright 2014-2015 Dan Kempster <[email protected]> |
|
| 11 | + */ |
|
| 12 | 12 | namespace Axstrad\Common\Tests\Exception; |
| 13 | 13 | |
| 14 | 14 | use Axstrad\Common\Exception\InvalidArgumentException; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Traits; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Component\Test\TraitTestCase; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Traits; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Component\Test\TraitTestCase; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Traits; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Component\Test\TraitTestCase; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Traits; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Component\Test\TraitTestCase; |
@@ -1,14 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @copyright 2014-2015 Dan Kempster <[email protected]> |
|
| 11 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @copyright 2014-2015 Dan Kempster <[email protected]> |
|
| 11 | + */ |
|
| 12 | 12 | namespace Axstrad\Common\Tests\Util; |
| 13 | 13 | |
| 14 | 14 | use Axstrad\Common\Util\Debug; |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | |
| 110 | 110 | public function testDumpResetsXdebugVarDisplayMaxDepthSettingToOriginal() |
| 111 | 111 | { |
| 112 | - if (!extension_loaded('xdebug')) { |
|
| 112 | + if ( ! extension_loaded('xdebug')) { |
|
| 113 | 113 | $this->markTestSkipped('XDebug extension is not loaded/installed'); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Util\ArrayUtil; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Common\Util\ArrayUtil; |
@@ -24,45 +24,45 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | class GetValueTest extends \PHPUnit_Framework_TestCase |
| 26 | 26 | { |
| 27 | - /** |
|
| 28 | - */ |
|
| 29 | - public function testReturnsValueFromKey() |
|
| 30 | - { |
|
| 31 | - $key = 'foo'; |
|
| 32 | - $array = array($key => 'bar'); |
|
| 33 | - $this->assertEquals( |
|
| 34 | - $array[$key], |
|
| 35 | - ArrayUtil::get($key, $array) |
|
| 36 | - ); |
|
| 37 | - } |
|
| 27 | + /** |
|
| 28 | + */ |
|
| 29 | + public function testReturnsValueFromKey() |
|
| 30 | + { |
|
| 31 | + $key = 'foo'; |
|
| 32 | + $array = array($key => 'bar'); |
|
| 33 | + $this->assertEquals( |
|
| 34 | + $array[$key], |
|
| 35 | + ArrayUtil::get($key, $array) |
|
| 36 | + ); |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @depends Axstrad\Common\Tests\Util\ArrayUtil\DecompilePathTest::testCanParseDotNotation |
|
| 41 | - */ |
|
| 42 | - public function testReturnsValueByPath() |
|
| 43 | - { |
|
| 44 | - $array = array('one' => array('two'=>'three')); |
|
| 45 | - $this->assertEquals( |
|
| 46 | - 'three', |
|
| 47 | - ArrayUtil::get('one.two', $array) |
|
| 48 | - ); |
|
| 49 | - } |
|
| 39 | + /** |
|
| 40 | + * @depends Axstrad\Common\Tests\Util\ArrayUtil\DecompilePathTest::testCanParseDotNotation |
|
| 41 | + */ |
|
| 42 | + public function testReturnsValueByPath() |
|
| 43 | + { |
|
| 44 | + $array = array('one' => array('two'=>'three')); |
|
| 45 | + $this->assertEquals( |
|
| 46 | + 'three', |
|
| 47 | + ArrayUtil::get('one.two', $array) |
|
| 48 | + ); |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - */ |
|
| 53 | - public function testReturnsNullWhenKeyDoesntExist() |
|
| 54 | - { |
|
| 55 | - $this->assertNull( |
|
| 56 | - ArrayUtil::get('one', array('foo'=>'bar')) |
|
| 57 | - ); |
|
| 58 | - } |
|
| 51 | + /** |
|
| 52 | + */ |
|
| 53 | + public function testReturnsNullWhenKeyDoesntExist() |
|
| 54 | + { |
|
| 55 | + $this->assertNull( |
|
| 56 | + ArrayUtil::get('one', array('foo'=>'bar')) |
|
| 57 | + ); |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - */ |
|
| 62 | - public function testReturnsDefaultValueWhenKeyDoesntExist() |
|
| 63 | - { |
|
| 64 | - $this->assertFalse( |
|
| 65 | - ArrayUtil::get('one', array('foo'=>'bar'), false) |
|
| 66 | - ); |
|
| 67 | - } |
|
| 60 | + /** |
|
| 61 | + */ |
|
| 62 | + public function testReturnsDefaultValueWhenKeyDoesntExist() |
|
| 63 | + { |
|
| 64 | + $this->assertFalse( |
|
| 65 | + ArrayUtil::get('one', array('foo'=>'bar'), false) |
|
| 66 | + ); |
|
| 67 | + } |
|
| 68 | 68 | } |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of the Axstrad library. |
|
| 4 | - * |
|
| 5 | - * (c) Dan Kempster <[email protected]> |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - * |
|
| 10 | - * @author Dan Kempster <[email protected]> |
|
| 11 | - * @package Axstrad\Common |
|
| 12 | - * @subpackage Tests |
|
| 13 | - */ |
|
| 3 | + * This file is part of the Axstrad library. |
|
| 4 | + * |
|
| 5 | + * (c) Dan Kempster <[email protected]> |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + * |
|
| 10 | + * @author Dan Kempster <[email protected]> |
|
| 11 | + * @package Axstrad\Common |
|
| 12 | + * @subpackage Tests |
|
| 13 | + */ |
|
| 14 | 14 | namespace Axstrad\Common\Tests\Util\ArrayUtil; |
| 15 | 15 | |
| 16 | 16 | use Axstrad\Common\Util\ArrayUtil; |
@@ -51,14 +51,14 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | */ |
| 54 | - public function testReturnsFalseForNumericallyIndexedArray() |
|
| 55 | - { |
|
| 56 | - $this->assertFalse( |
|
| 57 | - ArrayUtil::isAssociative(array( |
|
| 58 | - 1 => 'one', |
|
| 59 | - 2 => 'two', |
|
| 60 | - 3 => 'three', |
|
| 61 | - )) |
|
| 62 | - ); |
|
| 63 | - } |
|
| 54 | + public function testReturnsFalseForNumericallyIndexedArray() |
|
| 55 | + { |
|
| 56 | + $this->assertFalse( |
|
| 57 | + ArrayUtil::isAssociative(array( |
|
| 58 | + 1 => 'one', |
|
| 59 | + 2 => 'two', |
|
| 60 | + 3 => 'three', |
|
| 61 | + )) |
|
| 62 | + ); |
|
| 63 | + } |
|
| 64 | 64 | } |