Kaynağa Gözat

Use `autoload-dev` setting on "composer.json" file

This also removes "tests/bootstrap.php" file and defines `date.timezone`
in "phpunit.xml.dist".
Henrique Moody 10 yıl önce
ebeveyn
işleme
5d3f6de972
3 değiştirilmiş dosya ile 8 ekleme ve 16 silme
  1. 3 0
      composer.json
  2. 5 1
      phpunit.xml.dist
  3. 0 15
      tests/bootstrap.php

+ 3 - 0
composer.json

@@ -44,6 +44,9 @@
     "autoload": {
         "psr-4": {"Monolog\\": "src/Monolog"}
     },
+    "autoload-dev": {
+        "psr-4": {"Monolog\\": "tests/Monolog"}
+    },
     "provide": {
         "psr/log-implementation": "1.0.0"
     },

+ 5 - 1
phpunit.xml.dist

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<phpunit bootstrap="tests/bootstrap.php" colors="true">
+<phpunit bootstrap="vendor/autoload.php" colors="true">
     <testsuites>
         <testsuite name="Monolog Test Suite">
             <directory>tests/Monolog/</directory>
@@ -12,4 +12,8 @@
             <directory suffix=".php">src/Monolog/</directory>
         </whitelist>
     </filter>
+
+    <php>
+        <ini name="date.timezone" value="UTC"/>
+    </php>
 </phpunit>

+ 0 - 15
tests/bootstrap.php

@@ -1,15 +0,0 @@
-<?php
-
-/*
- * This file is part of the Monolog package.
- *
- * (c) Jordi Boggiano <j.boggiano@seld.be>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-$loader = require __DIR__ . "/../vendor/autoload.php";
-$loader->addPsr4('Monolog\\', __DIR__.'/Monolog');
-
-date_default_timezone_set('UTC');