remove() public method

Removes all resources matching the given query.
public remove ( string $query, string $language = 'glob' ) : integer
$query string A resource query.
$language string The language of the query. All implementations must support the language "glob".
return integer The number of resources removed from the repository.
 private function add($repositoryPath, array $filesystemPaths)
 {
     try {
         $this->addInOrder($filesystemPaths);
     } catch (Exception $e) {
         $this->repo->remove($repositoryPath);
         throw $e;
     }
 }
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testRemoveExpectsStringPath()
 {
     $this->repo->remove(new \stdClass());
 }