Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 33 deletions.
10 changes: 3 additions & 7 deletions test/AccessControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Memory
*/

namespace ZendTest\Memory;
Expand All @@ -16,9 +15,6 @@
use Zend\Memory\Container;

/**
* @category Zend
* @package Zend_Memory
* @subpackage UnitTests
* @group Zend_Memory
*/
class AccessControllerTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -62,14 +58,14 @@ public function testValueAccess()
$this->assertEquals($memObject->getRef(), '012_456789');

// value property
$this->assertEquals((string)$memObject->value, '012_456789');
$this->assertEquals((string) $memObject->value, '012_456789');

$memObject->value[7] = '_';
$this->assertEquals((string)$memObject->value, '012_456_89');
$this->assertEquals((string) $memObject->value, '012_456_89');

$memObject->value = 'another value';
$this->assertTrue($memObject->value instanceof \Zend\Memory\Value);
$this->assertEquals((string)$memObject->value, 'another value');
$this->assertEquals((string) $memObject->value, 'another value');
}

/**
Expand Down
10 changes: 3 additions & 7 deletions test/LockedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Memory
*/

namespace ZendTest\Memory;

use Zend\Memory\Container;

/**
* @category Zend
* @package Zend_Memory
* @subpackage UnitTests
* @group Zend_Memory
*/
class LockedTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -45,13 +41,13 @@ public function testValueAccess()
$this->assertEquals($memObject->getRef(), '012_456789');

// value property
$this->assertEquals((string)$memObject->value, '012_456789');
$this->assertEquals((string) $memObject->value, '012_456789');

$memObject->value[7] = '_';
$this->assertEquals((string)$memObject->value, '012_456_89');
$this->assertEquals((string) $memObject->value, '012_456_89');

$memObject->value = 'another value';
$this->assertEquals((string)$memObject->value, 'another value');
$this->assertEquals((string) $memObject->value, 'another value');
}

/**
Expand Down
4 changes: 0 additions & 4 deletions test/MemoryManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Memory
*/

namespace ZendTest\Memory;
Expand All @@ -17,9 +16,6 @@


/**
* @category Zend
* @package Zend_Memory
* @subpackage UnitTests
* @group Zend_Memory
*/
class MemoryManagerTest extends \PHPUnit_Framework_TestCase
Expand Down
11 changes: 3 additions & 8 deletions test/MovableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Memory
*/

namespace ZendTest\Memory;
Expand All @@ -14,9 +13,6 @@
use Zend\Memory\Container;

/**
* @category Zend
* @package Zend_Memory
* @subpackage UnitTests
* @group Zend_Memory
*/
class MovableTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -48,14 +44,14 @@ public function testValueAccess()
$this->assertEquals($memObject->getRef(), '012_456789');

// value property
$this->assertEquals((string)$memObject->value, '012_456789');
$this->assertEquals((string) $memObject->value, '012_456789');

$memObject->value[7] = '_';
$this->assertEquals((string)$memObject->value, '012_456_89');
$this->assertEquals((string) $memObject->value, '012_456_89');

$memObject->value = 'another value';
$this->assertTrue($memObject->value instanceof \Zend\Memory\Value);
$this->assertEquals((string)$memObject->value, 'another value');
$this->assertEquals((string) $memObject->value, 'another value');
}

/**
Expand Down Expand Up @@ -132,7 +128,6 @@ public function testInvalidSetThrowException()

/**
* Memory manager helper
*
*/
class DummyMemoryManager extends Memory\MemoryManager
{
Expand Down
10 changes: 3 additions & 7 deletions test/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Memory
*/

namespace ZendTest\Memory;
Expand All @@ -14,9 +13,6 @@
use Zend\Memory\Container;

/**
* @category Zend
* @package Zend_Memory
* @subpackage UnitTests
* @group Zend_Memory
*/
class ValueTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -52,7 +48,7 @@ public function testToString()
$this->assertEquals($valueObject->__toString(), '0123456789');

$this->assertEquals(strlen($valueObject), 10);
$this->assertEquals((string)$valueObject, '0123456789');
$this->assertEquals((string) $valueObject, '0123456789');
}

/**
Expand All @@ -64,13 +60,13 @@ public function testArrayAccess()
$this->assertEquals($valueObject[8], '8');

$valueObject[2] = '_';
$this->assertEquals((string)$valueObject, '01_3456789');
$this->assertEquals((string) $valueObject, '01_3456789');


$error_level = error_reporting();
error_reporting($error_level & ~E_NOTICE);
$valueObject[10] = '_';
$this->assertEquals((string)$valueObject, '01_3456789_');
$this->assertEquals((string) $valueObject, '01_3456789_');
error_reporting($error_level);
}
}
Expand Down

0 comments on commit f661746

Please sign in to comment.