Eloquent\Phony\Integration\CounterpartMatcherDriver::instance PHP Метод

instance() публичный статический Метод

Get the static instance of this driver.
public static instance ( ) : Eloquent\Phony\Matcher\MatcherDriver
Результат Eloquent\Phony\Matcher\MatcherDriver The static driver.
    public static function instance()
    {
        if (!self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }

Usage Example

Пример #1
0
 /**
  * Add the default matcher drivers.
  */
 public function addDefaultMatcherDrivers()
 {
     $this->addMatcherDriver(HamcrestMatcherDriver::instance());
     $this->addMatcherDriver(CounterpartMatcherDriver::instance());
     $this->addMatcherDriver(PhpunitMatcherDriver::instance());
     $this->addMatcherDriver(SimpletestMatcherDriver::instance());
     $this->addMatcherDriver(PhakeMatcherDriver::instance());
     $this->addMatcherDriver(ProphecyMatcherDriver::instance());
     $this->addMatcherDriver(MockeryMatcherDriver::instance());
 }