Beispiel #1
0
 /**
  * @test
  */
 public function displayUsesDriver()
 {
     $dummyDriver = new DummyDriver();
     $image = new Image('foo', $dummyDriver, $this->handle);
     $image->display();
     assert($dummyDriver->lastDisplayedHandle(), isSameAs($this->handle));
 }
 /**
  * @test
  */
 public function castFromInstanceReturnsInstance()
 {
     $ipAddress = new IpAddress('127.0.0.1');
     assert(IpAddress::castFrom($ipAddress), isSameAs($ipAddress));
 }
 /**
  * @test
  */
 public function castFromInstanceReturnsInstance()
 {
     $rootpath = new Rootpath();
     assert(Rootpath::castFrom($rootpath), isSameAs($rootpath));
 }
 /**
  * @test
  * @since  5.3.0
  */
 public function firstNamedReturnsFirstAddedAnnotationWithThisName()
 {
     $first = new Annotation('foo');
     assert($this->annotations->add($first)->add(new Annotation('foo'))->firstNamed('foo'), isSameAs($first));
 }
Beispiel #5
0
 /**
  * @test
  * @since  4.0.0
  */
 public function castFromInstanceReturnsInstance()
 {
     $uri = HttpUri::fromString('http://example.net/');
     assert(HttpUri::castFrom($uri), isSameAs($uri));
 }
 /**
  * @test
  */
 public function createFromSecretReturnsInstance()
 {
     $secret = Secret::create('payload');
     assert(Secret::create($secret), isSameAs($secret));
 }
Beispiel #7
0
 /**
  * @test
  */
 public function displayStoresHandleAsLastDisplayed()
 {
     $handle = imagecreatefrompng($this->testPath . 'empty.png');
     $this->dummyDriver->display($handle);
     assert($this->dummyDriver->lastDisplayedHandle(), isSameAs($handle));
 }
Beispiel #8
0
 /**
  * @test
  */
 public function valueOfNullIsAlwaysSame()
 {
     assert(value(null), isSameAs(value(null)));
 }