Пример #1
0
 /**
  * @throws Exception\Uncloneable
  */
 public function __clone()
 {
     throw Exception\Uncloneable::fromClass(__CLASS__);
 }
Пример #2
0
 public function testFromNonObject()
 {
     $exception = Uncloneable::fromClass('foo');
     $this->assertInstanceOf(Uncloneable::class, $exception);
     $this->assertSame('Trying to clone an uncloneable object of class foo', $exception->getMessage());
 }