예제 #1
0
 /**
  * @covers Mobileka\MosaicArray\MosaicArray::toArray
  */
 public function test_returns_target_array()
 {
     $ma = new MosaicArray($this->target);
     // full target array
     $expect = $this->target;
     $result = $ma->toArray();
     assertEquals($expect, $result);
     // only numbers
     $expect = range(1, 5);
     $result = $ma->toArray('numbers');
     assertEquals($expect, $result);
     // negative result
     $expect = ['blah'];
     $result = $ma->toArray();
     assertNotEquals($expect, $result);
 }
예제 #2
0
 /**
  * @return array
  */
 public function get()
 {
     return $this->data->toArray();
 }