{"id":15984953,"url":"https://github.com/divineomega/phantomjs-laravel-testing","last_synced_at":"2025-03-18T01:30:27.145Z","repository":{"id":56969660,"uuid":"81265529","full_name":"DivineOmega/PhantomJS-Laravel-Testing","owner":"DivineOmega","description":"The PhantomJS Laravel Testing package allows you to easily test your Laravel application's JavaScript functionality.","archived":false,"fork":false,"pushed_at":"2018-03-06T10:00:02.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T06:04:26.686Z","etag":null,"topics":["automated-testing","functional-testing","integration-testing","laravel","phantomjs","php","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DivineOmega.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-07T23:28:42.000Z","updated_at":"2019-09-08T00:32:13.000Z","dependencies_parsed_at":"2022-08-21T06:40:23.517Z","dependency_job_id":null,"html_url":"https://github.com/DivineOmega/PhantomJS-Laravel-Testing","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2FPhantomJS-Laravel-Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2FPhantomJS-Laravel-Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2FPhantomJS-Laravel-Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2FPhantomJS-Laravel-Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DivineOmega","download_url":"https://codeload.github.com/DivineOmega/PhantomJS-Laravel-Testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893849,"owners_count":20364918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-testing","functional-testing","integration-testing","laravel","phantomjs","php","testing"],"created_at":"2024-10-08T02:11:36.719Z","updated_at":"2025-03-18T01:30:26.788Z","avatar_url":"https://github.com/DivineOmega.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhantomJS Laravel Testing\n\nThe PhantomJS Laravel Testing package allows you to easily test your Laravel application's JavaScript functionality.\nIt makes use of the PhantomJS headless browser to emulate how a real use would interact with your pages. If \nyou have done regular Laravel testing, you'll be happy to know that this package attempts to match its syntax \nas much as possible.\n\n**💡 NOTE: If you're starting a new project, I recommend using [Laravel Dusk](https://laravel.com/docs/master/dusk) instead.  [PhantomJS development is being suspended](https://github.com/ariya/phantomjs/issues/15344) and will likely not receive any future updates.**\n\n## Features\n\n* Identical syntax to standard Laravel testing code where possible\n* PhantomJS-powered headless browser allows full functionality testing, including JavaScript \u0026 AJAX\n* Makes use of database transactions to prevent testing having permanent effects on the database\n* Automated setup and install of all dependencies, including phantomjs binary\n\n## Requirements\n\n*  Only Laravel 5.1 is currently supported\n\n## Installation\n\n1. Add composer script `\"PhantomInstaller\\\\Installer::installPhantomJS\"` to `composer.json` `post-install-cmd` and `post-update-cmd` arrays.\n2. Install via `composer require divineomega/phantomjs-laravel-testing`.\n3. Add service provider `DivineOmega\\PhantomJSLaravelTesting\\ServiceProvider::class` to `config/app.php` `providers` array.\n4. Add global middleware `\\DivineOmega\\PhantomJSLaravelTesting\\Http\\Middleware\\GlobalMiddleware::class` to `app/Http/Kernel.php` `middleware` array.\n\n## Usage\n\nSimply change your test classes to extend `PhantomJSTestCase` instead of `TestCase`, then run your unit tests as you normally do. PhantomJS will\nautomatically be started up when required.\n\nAn example test case is shown below.\n\n```php\n\n\u003c?php\n\nuse DivineOmega\\PhantomJSLaravelTesting\\Objects\\PhantomJSTestCase;\n\nclass ExampleTestCase extends PhantomJSTestCase\n{\n    public function testGoogleShowsImFeelingLucky()\n    {\n    \n        $this-\u003evisit('https://google.co.uk/');\n        $this-\u003esee('I\\'m Feeling Lucky');\n    }\n\n    public function testGoogleShowsImFeelingDucky()\n    {\n        $this-\u003evisit('https://google.co.uk/');\n        $this-\u003esee('I\\'m Feeling Ducky');\n    }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphantomjs-laravel-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivineomega%2Fphantomjs-laravel-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphantomjs-laravel-testing/lists"}