Page MenuHomeDevCentral

D236.id556.diff
No OneTemporary

D236.id556.diff

diff --git a/tests/Providers/ConfigTest.php b/tests/Providers/ConfigTest.php
--- a/tests/Providers/ConfigTest.php
+++ b/tests/Providers/ConfigTest.php
@@ -6,17 +6,35 @@
use File;
class ConfigTest extends TestCase {
- public function testOmittedFiles () {
- $providers = [];
+ /**
+ * The actual list of services providers
+ *
+ * @var string[]
+ */
+ private $providers;
+
+ /**
+ * The service providers' namespace
+ *
+ * @var string
+ */
+ private $namespace;
+
+ public function setUp () {
+ parent::setUp();
- $actualProviders = Config::get('app.providers');
+ $this->providers = Config::get('app.providers');
+ $this->namespace = $this->app->getInstance()->getNamespace()
+ . 'Providers\\';
+ }
- $namespace = $this->app->getInstance()->getNamespace() . 'Providers\\';
+ public function testOmittedFiles () {
$files = File::allFiles(app_path('Providers'));
+
foreach ($files as $file) {
- $class = $namespace . $file->getBasename('.php');
+ $class = $this->namespace . $file->getBasename('.php');
$this->assertContains(
- $class, $actualProviders,
+ $class, $this->providers,
"The class $class should be added to config/app.php in the " .
"providers array."
);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 06:16 (10 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259593
Default Alt Text
D236.id556.diff (1 KB)

Event Timeline