InstallTest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Tests\Browser;
  3. use Dcat\Admin\Admin;
  4. use Tests\TestCase;
  5. /**
  6. * @group install
  7. */
  8. class InstallTest extends TestCase
  9. {
  10. protected $login = false;
  11. public function testInstalledDirectories()
  12. {
  13. $this->assertFileExists(admin_path());
  14. $this->assertFileExists(admin_path('Controllers'));
  15. $this->assertFileExists(admin_path('routes.php'));
  16. $this->assertFileExists(admin_path('bootstrap.php'));
  17. $this->assertFileExists(admin_path('Controllers/HomeController.php'));
  18. $this->assertFileExists(admin_path('Controllers/AuthController.php'));
  19. $this->assertFileExists(admin_path('Metrics/Examples'));
  20. $this->assertFileExists(admin_path('Metrics/Examples/NewDevices.php'));
  21. $this->assertFileExists(admin_path('Metrics/Examples/NewUsers.php'));
  22. $this->assertFileExists(admin_path('Metrics/Examples/ProductOrders.php'));
  23. $this->assertFileExists(admin_path('Metrics/Examples/Sessions.php'));
  24. $this->assertFileExists(admin_path('Metrics/Examples/Tickets.php'));
  25. $this->assertFileExists(config_path('admin.php'));
  26. $this->assertFileExists(public_path(Admin::asset()->getRealPath('@admin')));
  27. $this->assertFileExists(database_path('migrations/2016_01_04_173148_create_admin_tables.php'));
  28. $this->assertFileExists(resource_path('lang/en/admin.php'));
  29. $this->assertFileExists(resource_path('lang/zh-CN/admin.php'));
  30. $this->assertFileExists(resource_path('lang/zh-CN/global.php'));
  31. }
  32. }