File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 2121 "bearframework/localization-addon" : " 1.*" ,
2222 "ivopetkov/client-packages-bearframework-addon" : " 1.*"
2323 },
24+ "require-dev" : {
25+ "bearcms/addon-tests" : " 1.*"
26+ },
2427 "autoload" : {
2528 "files" : [
2629 " autoload.php"
Original file line number Diff line number Diff line change 1+ <phpunit bootstrap =" vendor/autoload.php" >
2+ <testsuites >
3+ <testsuite name =" " >
4+ <directory >./tests/</directory >
5+ </testsuite >
6+ </testsuites >
7+ <coverage >
8+ <include >
9+ <directory >./components/</directory >
10+ <directory >./locales/</directory >
11+ <file >./index.php</file >
12+ </include >
13+ </coverage >
14+ </phpunit >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * Social sharing addon for Bear Framework
5+ * https://github.com/ivopetkov/social-sharing-bearframework-addon
6+ * Copyright (c) Ivo Petkov
7+ * Free to use under the MIT license.
8+ */
9+
10+ /**
11+ * @runTestsInSeparateProcesses
12+ */
13+ class CodeElementTest extends BearCMS \AddonTests \PHPUnitTestCase
14+ {
15+ /**
16+ *
17+ */
18+ public function testOutput ()
19+ {
20+ $ app = $ this ->getApp ();
21+
22+ $ html = '<bearcms-code-element code="test-code"/> ' ;
23+ $ result = $ app ->components ->process ($ html );
24+
25+ $ this ->assertTrue (strpos ($ result , '<code class="bearcms-code-element" ' ) !== false );
26+ $ this ->assertTrue (strpos ($ result , 'test-code ' ) !== false );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments