InstallTest.php 1.5 KB

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