You need to first install PHPUnit, I assume this is done already. Next, create a new class file with a class called MessageTest that extends from PHP Unit's base TestCase class. Finally, add two methods to this test class: testIsValidMessage() and testSendMessage(), use common testing methodology such as assertTrue() and assertEquals() with mock message objects(objects that you create for testing purposes, they may or may not have correct states). The first method should be very simple to test(2-3 assertTrue() should be enough), the second may be a bit difficult and will require some creativity(since it's a void method that returns nothing).
Also this may not be relevant to your question, but I believe your class design is flawed to begin with. A message class whose behavior depends on type-code is a poor OO design, instead you are better off either using Inheritance/Polymorphism to create specialized message sub-classes corresponding to a single message type, or applying composite/strategy design pattern to compensate behaviors that alter depending on the message type. The problem is, assume you have another method similar to sendMessage() that depends on the type of your message, you will end up writing another switch...case statement checking exactly the same type code again. Switch...case statement itself is usually considered a bad smell in programming, duplicated switch...case statement is pretty much always a sign of improper design. I personally only use switch...case in factory classes(and in fact, using dynamic method call even factory methods can eliminate switch...case statements), and make sure the same switch condition/type is checked no more than once. Read the book Pro PHP Refactoring and you will find techniques such as Replace Typecode with State/Strategy and Replace Conditionals/Switches with Polymorphism, these are all adapted from Martin Fowler's original book on refactoring and will help you design a better software.