public function _initialize() { if (!($this->moduleContainer->hasModule('WPLoader') || $this->moduleContainer->hasModule('WPBootstrapper'))) { throw new ModuleException(__CLASS__, "Modules WPLoader or WPBootstrapper are required for WPQueries to work"); } $this->constants->defineIfUndefined('SAVEQUERIES', true); }
/** * @test * it should define the SAVEQUERIES constant if not defined already */ public function it_should_define_the_savequeries_constant_if_not_defined_already() { $this->constants->defineIfUndefined('SAVEQUERIES', true)->shouldBeCalled(); $sut = $this->make_instance(); $sut->_initialize(); }