Exemplo n.º 1
0
 /**
  * Register trait
  *
  * @param string $trait
  * @param string $pattern
  * @param float $sort
  *
  * @return TraitReflection
  */
 public function registerTrait($trait, $pattern = null, $sort = null)
 {
     return $this->_traitRegistry->register($trait, $pattern, $sort);
 }
Exemplo n.º 2
0
 /**
  * A pattern for trait is required
  *
  * @test
  * @expectedException \RuntimeException
  * @expectedExceptionMessage No `pattern` defined for trait
  */
 public function shouldFailOnMissingPattern()
 {
     $registry = new TraitRegistry();
     $registry->register(TraitSample::class);
 }