| | 93 | |
| | 94 | |
| | 95 | function test_get_max_upload_size_proper_value_zero_first() { |
| | 96 | if (is_multisite()) { |
| | 97 | $this->markTestSkipped("This test doesn't work on multisite"); |
| | 98 | } |
| | 99 | |
| | 100 | |
| | 101 | $first = 0; |
| | 102 | $second = 700*1024*1024; |
| | 103 | |
| | 104 | $result = wp_max_upload_size($first,$second); |
| | 105 | $this->assertEquals($second, $result); |
| | 106 | } |
| | 107 | |
| | 108 | |
| | 109 | function test_get_max_upload_size_proper_value_zero_second() { |
| | 110 | if (is_multisite()) { |
| | 111 | $this->markTestSkipped("This test doesn't work on multisite"); |
| | 112 | } |
| | 113 | |
| | 114 | $first = 700*1024*1024; |
| | 115 | $second = 0; |
| | 116 | |
| | 117 | $result = wp_max_upload_size($first,$second); |
| | 118 | $this->assertEquals($first, $result); |
| | 119 | } |
| | 120 | |
| | 121 | function test_get_max_upload_size_proper_value_bigger_first() { |
| | 122 | if (is_multisite()) { |
| | 123 | $this->markTestSkipped("This test doesn't work on multisite"); |
| | 124 | } |
| | 125 | |
| | 126 | $first = 700*1024*1024; |
| | 127 | $second = 400*1024*1024; |
| | 128 | |
| | 129 | $result = wp_max_upload_size($first,$second); |
| | 130 | $this->assertEquals($second, $result); |
| | 131 | } |
| | 132 | |
| | 133 | function test_get_max_upload_size_proper_value_bigger_second() { |
| | 134 | if (is_multisite()) { |
| | 135 | $this->markTestSkipped("This test doesn't work on multisite"); |
| | 136 | } |
| | 137 | |
| | 138 | $first = 700*1024*1024; |
| | 139 | $second = 5000*1024*1024; |
| | 140 | |
| | 141 | $result = wp_max_upload_size($first,$second); |
| | 142 | $this->assertEquals($first, $result); |
| | 143 | } |
| | 144 | |
| | 145 | function test_get_max_upload_size_proper_value_equal() { |
| | 146 | if (is_multisite()) { |
| | 147 | $this->markTestSkipped("This test doesn't work on multisite"); |
| | 148 | } |
| | 149 | |
| | 150 | $first = 700*1024*1024; |
| | 151 | $second = 700*1024*1024; |
| | 152 | |
| | 153 | $result = wp_max_upload_size($first,$second); |
| | 154 | $this->assertEquals($first, $result); |
| | 155 | } |
| | 156 | |