Passed
Branch stable (06c279)
by Nuno
05:21 queued 02:48
created

RenamerTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace Tests;
4
5
use Illuminate\Support\Facades\File;
6
7
class RenamerTest extends TestCase
8
{
9
    public function tearDown()
10
    {
11
        File::copy(base_path('save-composer.json'), base_path('composer.json'));
12
        File::copy(base_path('save-application'), base_path('application'));
13
        File::delete(base_path('zonda'));
14
    }
15
16
    /** @test */
17
    public function it_renames_the_binary(): void
18
    {
19
        $this->app->call('app:rename', ['name' => "zonda"]);
20
21
        $this->assertTrue(File::exists(base_path('zonda')));
22
        $this->assertContains('"bin": ["zonda"]', File::get(base_path('composer.json')));
23
    }
24
}
25