Ejemplo n.º 1
0
 /**
  * Initializes the token store.
  *
  * @param  string|DocBlox_Reflection_Token[]|string[] $data String to parse or a list of DocBlox_Tokens, or the result from a
  *                                               token_get_all() method call.
  * @see    token_get_all()
  */
 public function __construct($data)
 {
     // convert to token objects; converting up front is _faster_ than ad hoc conversion
     foreach ($data as $key => $token) {
         if ($token instanceof DocBlox_Reflection_Token) {
             continue;
         }
         $data[$key] = new DocBlox_Reflection_Token($token);
     }
     parent::__construct($data);
 }
 /**
  * Tests whether the current method returns the element contained underneath the current pointer.
  *
  * Note: for some reason the current() keyword does not work; this has been observed with other ArrayObjects.
  *
  * @return void
  */
 public function testCurrent()
 {
     $this->assertEquals(2, $this->fixture->seek(1));
     //    $this->assertEquals(2, current($this->fixture));
     $this->assertEquals(2, $this->fixture->current());
 }