| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 32 | public function testBuildUri() |
||
| 33 | { |
||
| 34 | $settings = array( |
||
| 35 | 'tweet' => 'tweeeeeeeet', |
||
| 36 | 'foo' => 'bar', |
||
| 37 | 'align' => 'bar', |
||
| 38 | ); |
||
| 39 | |||
| 40 | $expected = sprintf('%s?%s', TwitterEmbedTweetBlockService::TWITTER_OEMBED_URI, 'align=bar&url=tweeeeeeeet'); |
||
| 41 | |||
| 42 | $blockService = new TwitterEmbedTweetBSTest('', $this->getMock('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')); |
||
| 43 | $this->assertEquals($expected, $blockService->publicBuildUri(true, $settings)); |
||
| 44 | |||
| 45 | $expected = sprintf('%s?%s', TwitterEmbedTweetBlockService::TWITTER_OEMBED_URI, 'align=bar&id=tweeeeeeeet'); |
||
| 46 | $this->assertEquals($expected, $blockService->publicBuildUri(false, $settings)); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.