{"action":"created","issue":{"url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/29","repository_url":"https://api.github.com/repos/Modelizer/Laravel-Selenium","labels_url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/29/comments","events_url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/29/events","html_url":"https://github.com/Modelizer/Laravel-Selenium/issues/29","id":197907096,"number":29,"title":"Selenium  not using the phpunit.xml mysql connection","user":{"login":"Abonive","id":21284362,"avatar_url":"https://avatars.githubusercontent.com/u/21284362?v=3","gravatar_id":"","url":"https://api.github.com/users/Abonive","html_url":"https://github.com/Abonive","followers_url":"https://api.github.com/users/Abonive/followers","following_url":"https://api.github.com/users/Abonive/following{/other_user}","gists_url":"https://api.github.com/users/Abonive/gists{/gist_id}","starred_url":"https://api.github.com/users/Abonive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abonive/subscriptions","organizations_url":"https://api.github.com/users/Abonive/orgs","repos_url":"https://api.github.com/users/Abonive/repos","events_url":"https://api.github.com/users/Abonive/events{/privacy}","received_events_url":"https://api.github.com/users/Abonive/received_events","type":"User","site_admin":false},"labels":[{"id":436317269,"url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/labels/bug","name":"bug","color":"ee0701","default":true},{"id":508835009,"url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/labels/high-priority","name":"high-priority","color":"d93f0b","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-28T19:52:10Z","updated_at":"2016-12-31T12:28:38Z","closed_at":"2016-12-30T18:42:10Z","body":"When running a test the factory method does create the record in the 'testing' database, but when selenium hits the page its using the default db connection and when i try to login the just created user it gets **credentials don't match message** and test fails.\r\n\r\nalso the laravel DatabaseTransactions doesn't work either.\r\n\r\nmy phpunit.xml\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<phpunit backupGlobals=\"false\"\r\n         backupStaticAttributes=\"false\"\r\n         bootstrap=\"bootstrap/autoload.php\"\r\n         colors=\"true\"\r\n         convertErrorsToExceptions=\"true\"\r\n         convertNoticesToExceptions=\"true\"\r\n         convertWarningsToExceptions=\"true\"\r\n         processIsolation=\"false\"\r\n         stopOnFailure=\"false\">\r\n    <testsuites>\r\n        <testsuite name=\"Application Test Suite\">\r\n            <directory suffix=\"Test.php\">./tests</directory>\r\n        </testsuite>\r\n    </testsuites>\r\n    <filter>\r\n        <whitelist processUncoveredFilesFromWhitelist=\"true\">\r\n            <directory suffix=\".php\">./app</directory>\r\n        </whitelist>\r\n    </filter>\r\n    <php>\r\n        <env name=\"APP_ENV\" value=\"testing\"/>\r\n        <env name=\"CACHE_DRIVER\" value=\"array\"/>\r\n        <env name=\"SESSION_DRIVER\" value=\"array\"/>\r\n        <env name=\"QUEUE_DRIVER\" value=\"sync\"/>\r\n        <env name=\"DB_CONNECTION\" value=\"testing\"/>\r\n    </php>\r\n</phpunit>\r\n```\r\n\r\ni have 'testing' connection setup.\r\n\r\nmy test\r\n\r\n```php\r\n<?php\r\n\r\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\r\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\r\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\r\n\r\nuse App\\User;\r\nuse Modelizer\\Selenium\\SeleniumTestCase;\r\n\r\nclass LoginTest extends SeleniumTestCase\r\n{\r\n\r\n    use DatabaseTransactions;\r\n\r\n    /** @test */\r\n    public function LogIn()\r\n    {\r\n        $user = factory(User::class)->create();\r\n\r\n        $this->visit('/login')\r\n                ->type($user->email, 'email')\r\n                ->type('secret', 'password')\r\n                ->press('Entrar')\r\n                ->seePageIs('/home')\r\n    }\r\n}\r\n```\r\n\r\nI tried to put `putenv('DB_CONNECTION=testing');` in the **Application** trait **createApplication** method inside the package but that didn't work either.\r\n\r\nAny ideas why it doesn't work? and how to make it work?"},"comment":{"url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/comments/269862957","html_url":"https://github.com/Modelizer/Laravel-Selenium/issues/29#issuecomment-269862957","issue_url":"https://api.github.com/repos/Modelizer/Laravel-Selenium/issues/29","id":269862957,"user":{"login":"Abonive","id":21284362,"avatar_url":"https://avatars.githubusercontent.com/u/21284362?v=3","gravatar_id":"","url":"https://api.github.com/users/Abonive","html_url":"https://github.com/Abonive","followers_url":"https://api.github.com/users/Abonive/followers","following_url":"https://api.github.com/users/Abonive/following{/other_user}","gists_url":"https://api.github.com/users/Abonive/gists{/gist_id}","starred_url":"https://api.github.com/users/Abonive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abonive/subscriptions","organizations_url":"https://api.github.com/users/Abonive/orgs","repos_url":"https://api.github.com/users/Abonive/repos","events_url":"https://api.github.com/users/Abonive/events{/privacy}","received_events_url":"https://api.github.com/users/Abonive/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T12:28:38Z","updated_at":"2016-12-31T12:28:38Z","body":"it doesn't solve the problem for me."}}
{"actor":{"display_login":"Abonive"}}