Example #1
0
	public function testOffsetExists() {
		$collection = new DocumentSet();
		$this->assertEqual($collection->offsetExists(0), false);
		$collection->set(array('foo' => 'bar', 'bas' => 'baz'));
		$this->assertEqual($collection->offsetExists(0), true);
		$this->assertEqual($collection->offsetExists(1), true);
	}
 /**
  * Tests `Collection::offsetExists()`.
  */
 public function testOffsetExists()
 {
     $collection = new DocumentSet();
     $this->assertEqual($collection->offsetExists(0), false);
     $collection = new DocumentSet(array('data' => array('bar', 'baz', 'bob' => 'bill')));
     $this->assertEqual($collection->offsetExists(0), true);
     $this->assertEqual($collection->offsetExists(1), true);
 }