REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.81 KB
Close
//opt/alt/php53/usr/share/pear/test/DoctrineBridge/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
Text
Base64
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\Tests; use Symfony\Bridge\Doctrine\ContainerAwareEventManager; use Symfony\Component\DependencyInjection\Container; class ContainerAwareEventManagerTest extends \PHPUnit_Framework_TestCase { protected function setUp() { $this->container = new Container(); $this->evm = new ContainerAwareEventManager($this->container); } public function testDispatchEvent() { $this->container->set('foobar', $listener1 = new MyListener()); $this->evm->addEventListener('foo', 'foobar'); $this->evm->addEventListener('foo', $listener2 = new MyListener()); $this->evm->dispatchEvent('foo'); $this->assertTrue($listener1->called); $this->assertTrue($listener2->called); } public function testRemoveEventListener() { $this->evm->addEventListener('foo', 'bar'); $this->evm->addEventListener('foo', $listener = new MyListener()); $listeners = array('foo' => array('_service_bar' => 'bar', spl_object_hash($listener) => $listener)); $this->assertSame($listeners, $this->evm->getListeners()); $this->assertSame($listeners['foo'], $this->evm->getListeners('foo')); $this->evm->removeEventListener('foo', $listener); $this->assertSame(array('_service_bar' => 'bar'), $this->evm->getListeners('foo')); $this->evm->removeEventListener('foo', 'bar'); $this->assertSame(array(), $this->evm->getListeners('foo')); } } class MyListener { public $called = false; public function foo() { $this->called = true; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 10 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
DataCollector
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DataFixtures
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DependencyInjection
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ExpressionLanguage
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Fixtures
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Form
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpFoundation
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Logger
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Security
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Validator
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bootstrap.php
385 B
lrw-r--r--
2019-12-18 11:20:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ContainerAwareEventManagerTest.php
1.81 KB
lrw-r--r--
2019-12-18 11:20:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DoctrineOrmTestCase.php
765 B
lrw-r--r--
2019-12-18 11:20:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).