public function testDefaultStorageDirectory() { ClassLoaderClone::unregister(); $message = null; try { ClassLoaderClone::register(); } catch (SbpException $e) { $message = $e->getMessage(); } $app = __DIR__ . '/../../../../../../app'; if (file_exists($app . '/storage') && is_writable($app . '/storage')) { $this->assertSame(realpath(dirname(Sbp::phpFile('foo'))), realpath($app . '/storage/sbp'), 'PHP files should be stored in the sbp storage directory in the Laravel app directory'); return; } $this->assertTrue(strpos($message, 'register') !== false, 'Register method shoudl throw an exception no valid app path is found'); }