ModuleConfigTest.php 727 B

123456789101112131415161718192021
  1. <?php
  2. class ModuleConfigTest extends \PHPUnit\Framework\TestCase
  3. {
  4. // tests
  5. public function testCanBeCreatedForModuleName()
  6. {
  7. $exception = new \Codeception\Exception\ModuleConfigException('Codeception\Module\WebDriver', "Hello world");
  8. $this->assertEquals("WebDriver module is not configured!\n \nHello world", $exception->getMessage());
  9. }
  10. public function testCanBeCreatedForModuleObject()
  11. {
  12. $exception = new \Codeception\Exception\ModuleConfigException(
  13. new \Codeception\Module\CodeHelper(make_container()),
  14. "Hello world"
  15. );
  16. $this->assertEquals("CodeHelper module is not configured!\n \nHello world", $exception->getMessage());
  17. }
  18. }