/** * {@inheritdoc} */ public function setUp() { if (!function_exists('shm_attach') || !function_exists('pcntl_fork')) { $this->markTestSkipped('Required extensions are disabled'); } // Dirty trick to override the native functions in the next unit tests if (version_compare(PHP_VERSION, '5.4', '>')) { $fumocker = new Fumocker(); $fumocker->getMock('Vatson\\Callback', 'function_exists'); $fumocker->getMock('Vatson\\Callback', 'shm_attach'); $fumocker->getMock('Vatson\\Callback', 'shm_remove'); $fumocker->cleanup(); } }
/** * {@inheritdoc} */ public function tearDown() { $this->fumocker->cleanup(); }