/**
  * @test
  */
 public function shouldSetCollectionBuilds()
 {
     $repository = new Repository();
     $builds = new BuildCollection();
     $builds->fromArray(array(array('id' => 222)));
     $repository->setBuilds($builds);
     $this->assertEquals(222, $repository->getBuilds()->first()->getId());
 }
 /**
  * @test
  */
 public function shouldFoundElementByManyElements()
 {
     $constructorArray = array(array('id' => 777, 'number' => '21', 'author_name' => 'l3l0'), array('id' => 888, 'number' => '21', 'author_name' => 'Leszek'));
     $buildCollection = new BuildCollection($constructorArray);
     $foundBuildCollection = $buildCollection->findBy(array('number' => '21', 'author_name' => 'l3l0'));
     $this->assertCount(1, $foundBuildCollection);
     $this->assertEquals(777, $foundBuildCollection->first()->getId());
 }