<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Creating a PHP unit test for Sugar 7</title><link>/dev-club/b/dev-blog/posts/creating-a-php-unit-test-for-sugar-7</link><description>In a previous post, we learned how to write JavaScript unit tests using Sugar 7&amp;#39;s Jasmine framework. Today we will learn how to write PHP unit tests using Sugar 7&amp;#39;s PHPUnit framework. If you do not have access to Sugar 7 uni...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Creating a PHP unit test for Sugar 7</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/creating-a-php-unit-test-for-sugar-7</link><pubDate>Fri, 14 Feb 2020 09:47:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:438d3b8a-242f-4afb-b567-e2efd14d8c2c</guid><dc:creator>Sino Thomas</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;Hi ,&lt;/p&gt;&lt;p&gt;I tried the same method in Sugar 8.0.1 version with&amp;nbsp;PHPUnit 7.5.0.But when I tried to run the following.&lt;/p&gt;&lt;blockquote class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;p&gt;..\..\vendor\phpunit\vendor\bin\phpunit custom\modules\Accounts\AccountsOnSaveHooksTest.php&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I got the following error in php error log&lt;/p&gt;&lt;blockquote class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;p&gt;PHP Fatal error:&amp;nbsp; Uncaught PHPUnit\Runner\Exception: Class &amp;#39;AccountsOnSaveHooksTest&amp;#39; could not be found in &amp;#39;custom\modules\Accounts\AccountsOnSaveHooksTest.php&amp;#39;.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;What is the reason for this error and How can I solve this.&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=754&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>