Esempio n. 1
0
 /**
  * @test
  */
 public function addedProfileShouldBeReturned()
 {
     $filelib = new FileLibrary($this->getMockedStorageAdapter(), $this->getMockedBackendAdapter());
     $this->assertCount(1, $filelib->getProfiles());
     try {
         $profile = $filelib->getProfile('tussi');
         $this->fail('should have thrown exception');
     } catch (\InvalidArgumentException $e) {
         $p = new FileProfile('tussi', $this->getMockedLinker());
         $filelib->addProfile($p);
         $this->assertSame($p, $filelib->getProfile('tussi'));
         $this->assertCount(2, $filelib->getProfiles());
     }
 }