Ejemplo n.º 1
0
 public function it_can_resolve_a_property_file_for_a_given_property(PropertyFile $file)
 {
     $property = Property::ofType(Property::BLOCK);
     $file->getProperty()->willReturn($property);
     $this->givenCollectionContainsFile($file);
     $this->getByProperty($property)->shouldReturn($file);
 }
Ejemplo n.º 2
0
 /**
  * @param PropertyFile $file
  * @return PropertyFile
  */
 public function add(PropertyFile $file)
 {
     $key = $this->keyFromProperty($file->getProperty());
     $this->files[$key] = $file;
     return $file;
 }