You are here

function NameGeneratorSpec::its_name_generates_name_based_only_on_class_if_its_available in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php \spec\Prophecy\Doubler\NameGeneratorSpec::its_name_generates_name_based_only_on_class_if_its_available()

Parameters

\ReflectionClass $class:

\ReflectionClass $interface1:

\ReflectionClass $interface2:

File

vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php, line 51

Class

NameGeneratorSpec

Namespace

spec\Prophecy\Doubler

Code

function its_name_generates_name_based_only_on_class_if_its_available($class, $interface1, $interface2) {
  $class
    ->getName()
    ->willReturn('Some\\Custom\\Class');
  $interface1
    ->getShortName()
    ->willReturn('HandlerInterface');
  $interface2
    ->getShortName()
    ->willReturn('LoaderInterface');
  $this
    ->name($class, array(
    $interface1,
    $interface2,
  ))
    ->shouldStartWith('Double\\Some\\Custom\\Class\\P');
}