Yaffs site version 1.1
[yaffs-website] / vendor / symfony / config / Tests / ConfigCacheFactoryTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Config\Tests;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Config\ConfigCacheFactory;
16
17 class ConfigCacheFactoryTest extends TestCase
18 {
19     /**
20      * @expectedException \InvalidArgumentException
21      * @expectedExceptionMessage Invalid type for callback argument. Expected callable, but got "object".
22      */
23     public function testCachWithInvalidCallback()
24     {
25         $cacheFactory = new ConfigCacheFactory(true);
26
27         $cacheFactory->cache('file', new \stdClass());
28     }
29 }