This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
':wright.freenode.net NOTICE * :*** Looking up your hostname...\r\n:wright.freenode.net NOTICE * :*** Checking Ident\r\n:wright.freenode.net NOTICE * :*** Found your hostname\r\n:wright.freenode.net NOTICE * :*** No Ident response\r\n:wright.freenode.net 437 * testbot :Nick/channel is temporarily unavailable\r\nERROR :Closing Link: c-67-176-185-20.hsd1.in.comcast.net (Connection timed out)\r\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import socket | |
>>> s=socket.socket() | |
>>> s.connect(("irc.freenode.net",6667)) | |
>>> s.send("NICK :%s\r\n" % "testbot") | |
15 | |
>>> s.send("USER %s %s bla :%s\r\n" % ("testbot","irc.freenode.net","testbot")) | |
44 | |
>>> s.send("JOIN :%s\r\n" % "#dayly") | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @test | |
* Given that we're provided a valid number in kilometers | |
* Then we should be able to retrieve the miles equivalent | |
* @dataProvider getKmToMiles | |
**/ | |
public function ConvertMilesToKilometers($km,$expected) | |
{ | |
$this->distance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @test | |
* Given that we're provided a valid number in miles | |
* Then we should be able to retrieve the kilometer equivalent | |
* @dataProvider getMilesToKm | |
**/ | |
public function ConvertMilesToKilometers($miles,$expected) | |
{ | |
$this->distance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This account hook would be run before save | |
**/ | |
class AccountHook | |
{ | |
public function setDBAName($bean,$event,$arguments) | |
{ | |
$bean->dba_c = $bean->name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This test addresses the following function requirements: | |
* Given that an Account is created (properly filled out and saved) then | |
* the DBA field (dba_c) should be populated with the name that was provided | |
* for the Account name | |
* | |
* This is a pretty common type of Sugar customization/enhancement that I've come | |
* across, so this test is how I would validate that my logic hook is working |
NewerOlder