summaryrefslogtreecommitdiff
path: root/server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php
diff options
context:
space:
mode:
authorLoic GUEGAN <loic@Manzerbredes.home>2016-04-16 19:10:27 +0200
committerLoic GUEGAN <loic@Manzerbredes.home>2016-04-16 19:10:27 +0200
commita3ff4d243e2ac37d4516ae56ff86985eadc00eb8 (patch)
tree32e71c42855cc46d95d9c6b74ad2c145eb9ec7eb /server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php
parent396c90f921c30de2d15d2ce52d5d1beabf8eb52d (diff)
parent31d2d0c158ad4daa3dde7a905f3c2e312c194f2e (diff)
Test
Diffstat (limited to 'server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php')
-rwxr-xr-xserver/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php b/server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php
deleted file mode 100755
index f5d1fdb..0000000
--- a/server/vendor/php-opencloud/common/tests/unit/Common/ArrayAccessTraitTest.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-namespace OpenCloud\Test\Common;
-
-use OpenCloud\Common\ArrayAccessTrait;
-use OpenCloud\Test\TestCase;
-
-class ArrayAccessTraitTest extends TestCase
-{
- private $aa;
-
- public function setUp()
- {
- $this->aa = new ArrayAccess();
- }
-
- public function test_offset_is_set()
- {
- $this->aa->offsetSet('foo', 'bar');
- $this->assertEquals(['foo' => 'bar'], $this->aa->getElements());
- }
-
- public function test_it_appends_if_no_key_is_set()
- {
- $this->aa->offsetSet(null, 'bar');
- $this->assertEquals(['bar'], $this->aa->getElements());
- }
-
- public function test_if_checks_if_offset_exists()
- {
- $this->aa->offsetSet('bar', 'foo');
- $this->assertTrue($this->aa->offsetExists('bar'));
- $this->assertFalse($this->aa->offsetExists('baz'));
- }
-
- public function test_if_gets_offset()
- {
- $this->aa->offsetSet('bar', 'foo');
- $this->assertEquals('foo', $this->aa->offsetGet('bar'));
- $this->assertNull($this->aa->offsetGet('baz'));
- }
-
- public function test_it_unsets_offset()
- {
- $this->aa->offsetSet('bar', 'foo');
- $this->aa->offsetUnset('bar');
- $this->assertNull($this->aa->offsetGet('bar'));
- }
-}
-
-class ArrayAccess
-{
- use ArrayAccessTrait;
-
- public function getElements()
- {
- return $this->internalState;
- }
-}