Hello,
I would like to push this commit, but I get permission denied from
github. Can you add me to SignalSlot please ?
commit 8ac1fea61f3949ed4baec324fb41a1fe0f298e28
Author: James Pic <jamespic[@]gmail.com>
Date: Mon May 21 15:04:11 2012 +0200
- Removed a useless test that can't pass anyway.
The testcase setUp does::
ezcSignalStaticConnections::getInstance()->connections = array();
Which initializes the ezcSignalStaticConnections::$instance.
testDelayedInitialization calls ezcBaseInit::setCallback, and tests that the
callback was called and works. Of course the callback never gets
called as the
private ezcSignalStaticConnections::$instance was set in setUp().
This test is actually a test for ezcBaseInit and not SignalSlot itself. As a
matter of fact, removing this test does not affect code coverage.
Patch:
diff --git a/tests/static_connections_test.php
b/tests/static_connections_test.php
index c0680a0..c457cf2 100644
--- a/tests/static_connections_test.php
+++ b/tests/static_connections_test.php
@@ -49,16 +49,6 @@ class ezcSignalStaticConnectionsTest extends ezcTestCase
ezcSignalStaticConnections::getInstance()->connections = array();
}
- public function testDelayedInitialization()
- {
- ezcBaseInit::setCallback( 'ezcInitSignalStaticConnections',
'testDelayedInitSignalStaticConnections' );
- ezcSignalStaticConnections::getInstance()->connect(
'TheDelayed', 'signal', 'two' );
- $this->assertEquals(
- array( 1000 => array( 'two', 'one' ) ),
- ezcSignalStaticConnections::getInstance()->getConnections(
'TheDelayed', 'signal' )
- );
- }
-
public function testSingleConnectionGlobalFunction()
{
ezcSignalStaticConnections::getInstance()->connect(
'TheGiver', 'signal', 'slotFunction' );
diff --git a/tests/test_classes.php b/tests/test_classes.php
index 754fc77..5be9c81 100644
--- a/tests/test_classes.php
+++ b/tests/test_classes.php
@@ -124,12 +124,4 @@ function slotFunction()
TheReceiver::$globalFunctionRun = "brain damage";
}
-class testDelayedInitSignalStaticConnections implements
ezcBaseConfigurationInitializer
-{
- static function configureObject( $object )
- {
- $object->connect( 'TheDelayed', 'signal', 'one' );
- }
-}
-
?>
Received on Mon May 21 2012 - 14:14:31 BST
This archive was generated by hypermail 2.2.0 : Sun Nov 12 2017 - 19:36:13 GMT