Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768077
D236.id556.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D236.id556.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 06:16 (19 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259593
Default Alt Text
D236.id556.diff (1 KB)
Attached To
Mode
D236: Improve Providers\ConfigTest
Attached
Detach File
Event Timeline
Log In to Comment