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); }
/** * @param PropertyFile $file * @return PropertyFile */ public function add(PropertyFile $file) { $key = $this->keyFromProperty($file->getProperty()); $this->files[$key] = $file; return $file; }