Home > Development Tools > phpstorm > One article to complete the configuration of phpstorm+laravel+phpunit

One article to complete the configuration of phpstorm+laravel+phpunit

藏色散人
Release: 2022-02-01 04:00:31
forward
3631 people have browsed it

The following is an introduction to phpstorm-laravel-phpunit from the phpstorm tutorial column. I hope it will be helpful to friends in need!

1. Create a new composer.json file

{
    "require": {
        "yzalis/identicon": "^1.1",
        "phpunit/phpunit": "5.5.*"
    }
}
Copy after login

2. Run composer install to get the following directory structure

One article to complete the configuration of phpstorm+laravel+phpunit

Third, copy yzalis/phpuit.xml.dist to the root directory of the project and rename it to phpunit.xml

Four, configure the php environment of phpstorm

One article to complete the configuration of phpstorm+laravel+phpunit

Five, configure the PHPUnit environment

One article to complete the configuration of phpstorm+laravel+phpunit

Six, Create a new RunTest.php file

<?php namespace demo1;
use Identicon\Identicon;
use PHPUnit\Framework\TestCase;
class RunTest extends TestCase{
    
    public function testDemo(){
        $identicon = new Identicon();
        $img = $identicon->getImageData('bar',512);
        file_put_contents('./a.png',$img);
    }
}
Copy after login

7, execute

One article to complete the configuration of phpstorm+laravel+phpunit

##8, output

One article to complete the configuration of phpstorm+laravel+phpunit

The above is the detailed content of One article to complete the configuration of phpstorm+laravel+phpunit. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template