public function setUp() { parent::setUp(); $this->list = [1, "foo", 5.1, 5, "5.2", true, false, [], new stdClass()]; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['k1' => 1, 'k2' => '5.2', 'k3' => 5, 'k4' => '5.1', 'k5' => 10.2, 'k6' => true, 'k7' => [], 'k8' => new stdClass(), 'k9' => -10]; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->list = [$this, $this, $this]; $this->listIterator = new ArrayIterator($this->list); $this->keyArray = ['k1' => $this, 'k2' => $this]; $this->keyIterator = new ArrayIterator(['k1' => $this, 'k2' => $this]); }
public function setUp() { parent::setUp(); $this->intArray = [1 => 1, 2, "foo" => 3, 4]; $this->intIterator = new ArrayIterator($this->intArray); $this->floatArray = ["foo" => 1.5, 1.1, 1]; $this->floatIterator = new ArrayIterator($this->floatArray); }
public function setUp() { parent::setUp($this->getAliases()); $this->list = ['value', 'wrong', 'value']; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['k1' => 'value', 'k2' => 'wrong', 'k3' => 'value']; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->list = ['a', ['b'], ['C' => 'c'], [['d']], null]; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['ka' => 'a', 'kb' => ['b'], 'kc' => ['C' => 'c'], 'kd' => [['d']], 'ke' => null, null]; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->intArray = [1 => 1, 2, "foo" => 3]; $this->intIterator = new ArrayIterator($this->intArray); $this->floatArray = [1.1, 2.9, 3.5]; $this->floatIterator = new ArrayIterator($this->floatArray); }
public function setUp() { parent::setUp(); $this->list = ['first', 'second', 'third', 'fourth']; $this->listIterator = new ArrayIterator($this->list); $this->badArray = ['foo', 'bar', 'baz']; $this->badIterator = new ArrayIterator($this->badArray); }
public function setUp() { parent::setUp(); $this->list = ['value', 'value']; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['k1' => 'val1', 'k2' => 'val2']; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->goodArray = ['value', 'value', 'value']; $this->goodIterator = new ArrayIterator($this->goodArray); $this->badArray = ['value', 'value', 'foo']; $this->badIterator = new ArrayIterator($this->badArray); }
public function setUp() { parent::setUp(); $this->list = [1, 2, 3, 4]; $this->listIterator = new ArrayIterator($this->list); $this->badArray = ['foo', 'bar', 'baz']; $this->badIterator = new ArrayIterator($this->badArray); }
public function setUp() { parent::setUp('Functional\\drop_first', 'Functional\\drop_last'); $this->list = ['value1', 'value2', 'value3', 'value4']; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['k1' => 'val1', 'k2' => 'val2', 'k3' => 'val3', 'k4' => 'val4']; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->goodArray = [1, 2, 3, [4, 5, 6, [7, 8, 9]], 10, [11, [12, 13], 14], 15]; $this->goodArray2 = [1 => 1, "foo" => "2", 3 => "3", ["foo" => 5]]; $this->goodIterator = new ArrayIterator($this->goodArray); $this->goodIterator[3] = new ArrayIterator($this->goodIterator[3]); $this->goodIterator[5][1] = new ArrayIterator($this->goodIterator[5][1]); }
public function setUp() { parent::setUp(); $this->cb = $this->getMockBuilder('cb')->setMethods(['call'])->getMock(); $this->list = ['value0', 'value1', 'value2', 'value3']; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['k0' => 'value0', 'k1' => 'value1', 'k2' => 'value2']; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->list = ['value1', 'value2', 'value1', 'value']; $this->listIterator = new ArrayIterator($this->list); $this->mixedTypesArray = [1, '1', '2', 2, '3', 4]; $this->mixedTypesIterator = new ArrayIterator($this->mixedTypesArray); $this->hash = ['k1' => 'val1', 'k2' => 'val2', 'k3' => 'val2', 'k1' => 'val1']; $this->hashIterator = new ArrayIterator($this->hash); }
public function setUp() { parent::setUp(); $this->list = [$this, null, null]; $this->listIterator = new ArrayIterator($this->list); $this->keyArray = ['k1' => $this, 'k2' => null]; $this->keyIterator = new ArrayIterator(['k1' => $this, 'k2' => null]); $this->arrayVeryFirstNotCallable = [null, $this, null, null]; $this->iteratorVeryFirstNotCallable = new ArrayIterator($this->arrayVeryFirstNotCallable); }
public function setUp() { parent::setUp(); $this->trueArray = [true, true, true, true]; $this->trueIterator = new ArrayIterator($this->trueArray); $this->trueHash = ['k1' => true, 'k2' => true, 'k3' => true]; $this->trueHashIterator = new ArrayIterator($this->trueHash); $this->falseArray = [true, 1, true]; $this->falseIterator = new ArrayIterator($this->falseArray); $this->falseHash = ['k1' => true, 'k2' => 1, 'k3' => true]; $this->falseHashIterator = new ArrayIterator($this->falseHash); }
public function setUp() { parent::setUp(); $this->trueArray = [false, false, false, false]; $this->trueIterator = new ArrayIterator($this->trueArray); $this->trueHash = ['k1' => false, 'k2' => false, 'k3' => false]; $this->trueHashIterator = new ArrayIterator($this->trueHash); $this->falseArray = [false, 0, false, 'foo', [], (object) []]; $this->falseIterator = new ArrayIterator($this->falseArray); $this->falseHash = ['k1' => false, 'k2' => 0, 'k3' => false]; $this->falseHashIterator = new ArrayIterator($this->falseHash); }
public function setUp() { parent::setUp(); $this->trueArray = [false, null, false, false, 0]; $this->trueIterator = new ArrayIterator($this->trueArray); $this->trueHash = ['k1' => false, 'k2' => null, 'k3' => false, 'k4' => 0]; $this->trueHashIterator = new ArrayIterator($this->trueHash); $this->falseArray = [false, null, 0, 'foo']; $this->falseIterator = new ArrayIterator($this->falseArray); $this->falseHash = ['k1' => false, 'k2' => 0, 'k3' => true, 'k4' => null]; $this->falseHashIterator = new ArrayIterator($this->falseHash); }
public function setUp() { parent::setUp(); $this->list = ['cat', 'bear', 'aardvark']; $this->listIterator = new ArrayIterator($this->list); $this->hash = ['c' => 'cat', 'b' => 'bear', 'a' => 'aardvark']; $this->hashIterator = new ArrayIterator($this->hash); $this->sortCallback = function ($left, $right, $collection) { InvalidArgumentException::assertCollection($collection, __FUNCTION__, 3); return strcmp($left, $right); }; }
public function setUp() { parent::setUp(); $this->retryer = $this->getMock('Functional\\Tests\\Retryer'); }
public function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); $this->poller = $this->getMock('Functional\\Tests\\Poller'); }
public function setUp() { parent::setUp(); $this->callback = $this->getMockBuilder('stdClass')->setMethods(['execute'])->getMock(); self::$invocation = 0; }
public function setUp() { parent::setUp(); $this->array_1 = ['one' => '1', 'two' => '2', 3 => '3', 'null-index' => null, 'zero-index' => 0, 'zero-string-index' => '0', 'false-index' => false]; }
public function setUp() { parent::setUp('Functional\\reduce_right', 'Functional\\reduce_left'); $this->list = ['one', 'two', 'three']; $this->listIterator = new ArrayIterator($this->list); }
public function setUp() { parent::setUp(); $this->propertyExistsEverywhereArray = [(object) ['property' => 1], (object) ['property' => 2]]; $this->propertyExistsEverywhereIterator = new ArrayIterator($this->propertyExistsEverywhereArray); $this->propertyExistsSomewhere = [(object) ['property' => 1], (object) ['otherProperty' => 2]]; $this->propertyMagicGet = [new MagicGet(['property' => 1]), new MagicGet(['property' => 2]), ['property' => '3'], new ArrayObject(['property' => 4])]; $this->mixedCollection = [(object) ['property' => 1], ['key' => 'value'], ['property' => 2]]; $this->keyedCollection = ['test' => (object) ['property' => 1], 'test2' => (object) ['property' => 2]]; $fixedArray = new SplFixedArray(1); $fixedArray[0] = 3; $this->numericArrayCollection = ['one' => [1], 'two' => [1 => 2], 'three' => ['idx' => 2], 'four' => new ArrayObject([2]), 'five' => $fixedArray]; $this->issetExceptionArray = [(object) ['property' => 1], new MagicGetException(true, false)]; $this->issetExceptionIterator = new ArrayIterator($this->issetExceptionArray); $this->getExceptionArray = [(object) ['property' => 1], new MagicGetException(false, true)]; $this->getExceptionIterator = new ArrayIterator($this->getExceptionArray); }