Classi per la configurazione upload
Cristiano Magro
2018-01-16 ee1a7b42cf449b82c8f5dc03e6a53f4b94bcc0cc
Refactor sistemazione struttura libreria

fix test e cambio nomi classi
1 files added
1 files deleted
1 files renamed
3 files modified
24 ■■■■ changed files
phpunit.xml 8 ●●●●● patch | view | raw | blame | history
src/UploadFile/Autoloader.php 2 ●●● patch | view | raw | blame | history
src/UploadFile/Exc/Error.php patch | view | raw | blame | history
src/UploadFile/SetupUpload.class.php 2 ●●● patch | view | raw | blame | history
tests/SetupUploadTest.php 4 ●●●● patch | view | raw | blame | history
tests/phpunit.xml 8 ●●●●● patch | view | raw | blame | history
phpunit.xml
New file
@@ -0,0 +1,8 @@
<phpunit bootstrap="src/UploadFile/autoloader.php"
         stopOnFailure="true">
    <testsuites>
        <testsuite name="FileUpload">
            <directory>tests/</directory>
        </testsuite>
    </testsuites>
</phpunit>
src/UploadFile/Autoloader.php
@@ -22,7 +22,7 @@
    private static $classes = array(
        'FileUpload' => 'FileUpload.class.php',
        'SetupUpload' => 'SetupUpload.class.php',
        'Upload_Exc_Error' => 'Upload_Exc_Error.class.php',
        'Upload_Exc_Error' => 'Exc/Error.php',
    );
    /**
src/UploadFile/Exc/Error.php
src/UploadFile/SetupUpload.class.php
@@ -131,7 +131,7 @@
     */
    public function setNumMaxFiles($numero) {
        if (!is_integer($numero) || $numero <= 0) {
            throw new UploadFile_Exc();
            throw new Upload_Exc_Error();
        }
        $this->numMaxFiles = $numero;
tests/SetupUploadTest.php
@@ -66,7 +66,7 @@
     * Conversione di una stringa nel corrispondente valore di byte, stringhe 
     * non convertibili devono andare in errore
     * @since 0.3.1
     * @expectedException UploadFile_Exc
     * @expectedException Upload_Exc_Error
     * @dataProvider getBytesStringNotValid
     */
    public function test_str2BytesNonValido($byteString) {
@@ -93,7 +93,7 @@
    /**
     * Gestione di valori non adeguati 
     * @since 0.3.1
     * @expectedException UploadFile_Exc
     * @expectedException Upload_Exc_Error
     * @dataProvider getNumMaxFilesException
     */
    public function testNotValidNumMaxFilesGetException($num) {
tests/phpunit.xml
File was deleted