UnlinkDirectoryTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
/** 
3
 * Copyright 2018 Social Manager.
4
 * 
5
 * PHP version 7.2.8
6
 *
7
 * @category Album_Manager
8
 * @package  Tests
9
 * @author   Kishan Jasani <[email protected]>
10
 * @license  https://localhost/SocialManager/privacy_policy/privacy_policy.php 
11
 * @link     ""
12
 * 
13
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
14
 * use, copy, modify, and distribute this software in source code or binary
15
 * form for use in connection with the web services and APIs provided by
16
 * Kishan Jasani.
17
 *
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND
19
 */
20
class UnlinkDirectoryTest extends PHPUnit_Framework_TestCase
21
{
22
    protected $unlink_directory;
23
    /** 
24
     * Call before all test
25
     * 
26
     * @return ""
0 ignored issues
show
Documentation Bug introduced by
The doc comment "" at position 0 could not be parsed: Unknown type name '""' at position 0 in "".
Loading history...
27
     */
28
    protected function setUp() 
29
    {
30
        $this->unlink_directory = new Unlink_Directory();
31
    }
32
33
    /** 
34
     * Test method to reove directory
35
     * 
36
     * @param String $directory Directory to delete
37
     * 
38
     * @return ""
0 ignored issues
show
Documentation Bug introduced by
The doc comment "" at position 0 could not be parsed: Unknown type name '""' at position 0 in "".
Loading history...
39
     */
40
    function testRemoveDirectory($directory = null) 
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
41
    {
42
        $actual = $this->unlinkDirectory->removeDirectory($directory);
0 ignored issues
show
Bug introduced by
The property unlinkDirectory does not exist on UnlinkDirectoryTest. Did you mean unlink_directory?
Loading history...
43
        $this->assertEquals($actual, $actual);
44
    }
45
46
    /** 
47
     * Call after all test
48
     * 
49
     * @return ""
0 ignored issues
show
Documentation Bug introduced by
The doc comment "" at position 0 could not be parsed: Unknown type name '""' at position 0 in "".
Loading history...
50
     */
51
    protected function tearDown() 
52
    {
53
        unset($this->unlink_directory);
54
    }
55
}
56
//Run this file using command vendor/bin/phpunit Tests
57
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
58